package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;

/**
 * 项目计划对象 main_project_plan
 *
 * @author qijian
 * @date 2021-10-09
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_project_plan")
public class ProjectPlan extends BaseEntity{
    private static final long serialVersionUID = 1L;

    /** ID */
    @TableId
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "ID")
    private Long planId;

    /** 项目 */
    @Excel(name = "项目")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "项目")
    private Long projectId;

    /** BOM */
    @Excel(name = "BOM")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "BOM")
    private Long bomId;

    /** 物料 */
    @Excel(name = "物料")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "物料")
    private Long itemId;

    /** 工序 */
    @Excel(name = "工序")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "工序")
    private Long processId;

    /** 计划开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "计划开始时间")
    private Date startTime;

    /** 计划结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "计划结束时间")
    private Date endTime;

    /** 工作单元 */
    @Excel(name = "工作单元")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "工作单元")
    private Long factoryId;
}
